module.exports = {
    publicPath: '/',
    lintOnSave: true,
    runtimeCompiler: true,
    productionSourceMap: false,
    devServer: {
        disableHostCheck: true,
        port: '8101',
        open: false,
        compress: false,
        overlay: {
            warnings: false,
            errors: true
        },
        disableHostCheck: true,
        headers: {
            'Access-Control-Allow-Origin': '*'
        },
        // 配置跨域
        proxy: {
            '/dev': {
                target: 'http://192.168.0.135:7001',
                changeOrigin: true,
                pathRewrite: {
                    '^/dev': ''
                }
            },
            '/pc': {
                target: 'http://pcyang.zhuandanku.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/pc': ''
                }
            },
            '/pro': {
                target: 'https://zfx.xmonecode.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/pro': '/api'
                }
            }
        }
    },
    configureWebpack: () => {
        return { optimization: { minimize: true } };
    }
};
